package com.xcesys.extras.dataobject;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BlameableObject")
public abstract class BlameableObject extends TimestampableObject {

	private static final long serialVersionUID = -3575204943214975843L;

	/** user who created. */
	@XmlAttribute(name = "CreatedBy")
	private String createdBy;

	/** user who contributes last modify */
	@XmlAttribute(name = "UpdatedBy")
	private String updatedBy;

	public BlameableObject() {
	}

	public String getCreatedBy() {
		return createdBy;
	}

	public String getUpdatedBy() {
		return updatedBy;
	}

	public void setCreatedBy(String createdBy) {
		Object oldValue = this.createdBy;
		this.createdBy = createdBy;
		firePropertyChange("createdBy", oldValue, createdBy);
	}

	public void setUpdatedBy(String updatedBy) {
		Object oldValue = this.updatedBy;
		this.updatedBy = updatedBy;
		firePropertyChange("updatedBy", oldValue, updatedBy);
	}

}
